<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.one }" var="one"/>
<c:set value="${requestScope.cateList.data.list }" var="cateResponse" />
<jsp:useBean id="pojo" class="com.zxq.lawenf.pojo.AApproval"/>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<title>审核申请单 - 综合性执法系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	    <link rel="stylesheet" href="${rootPath }/common/resource/bootstrapvalidator/css/form-validation.css" rel="stylesheet">
	  	<script type="text/javascript" src="${rootPath }/common/resource/bootstrapvalidator/js/form-validation.js"></script>
	  	
	  	<script language="javascript" type="text/javascript" src="${rootPath }/common/resource/My97DatePicker/WdatePicker.js"></script>
	  	
	  	<script type="text/javascript" charset="utf-8" src="${rootPath }/common/resource/ueditor/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="${rootPath }/common/resource/ueditor/ueditor.all.min.js"> </script>
	    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
	    <!--这里加载的语言文件会覆盖你在配置项目里审核的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	    <script type="text/javascript" charset="utf-8" src="${rootPath }/common/resource/ueditor/lang/zh-cn/zh-cn.js"></script>
	  	
	  	<script type="text/javascript">
	  		$(function()
			{
	  			/* 表单验证 */
			  	$("#form").FormValidation({
		  			fields:
	  				{
		  				/* 名称 */
		  				name:
	  					{
		  					validators: {
		  	                    notEmpty: {
		  	                        message: '名称不能为空'
		  	                    }
		  	                }
	  					},
	  					/* qq */
		  				content:
	  					{
		  					validators: {
		  	                    notEmpty: {
		  	                        message: '内容不能为空'
		  	                    }
		  	                }
	  					}
	  				}
				});
	  			
			  	/* 百度编辑器 */
			  	var ue = UE.getEditor('editor');
			  	
			  	switchCate("cateId");
			});
	  		
	  		
	  		var ue = UE.getEditor('editor');
	  		
	  		var cateData = ${cateResponse};
	  		/**
	  			切换模板
	  		*/
	  		function switchCate(selectId)
	  		{
	  			/* 获取选中的值 */
	  			var selectVal = $("#" + selectId).val();
	  			if(selectVal == '')
				{
	  				ue.setContent('');
				}
	  				
	  			/* 循环模板里面的数据 */
	  			for(var i = 0 ; i < cateData.length ; i ++)
  				{
	  				/* 获取指定元素的数据 */
  					var cateTemp = cateData[i] ; 
	  				if(selectVal == cateTemp.id)
	  				{
	  					ue.ready(function()
						{
		  					/* 找到模板 */
		  					ue.setContent(cateTemp.content);
						})
	  				}
  				}
	  		}
	  	</script>
	</head>
	<body>
		<%@ include file="/common/include/head_header.jsp"%>
		<!-- 网页的主体 -->
		<div class="container">
			<div class="row">
				<div class="col-md-11 col-sm-offset-1">
					<div class="table-responsive mt-2">
						<table class="table table-striped table-hover">
							<thead>
								<tr>
									<th colspan="2">审核案件</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>创建人</td>
									<td>${one.users.nickName}</td>
								</tr>
								<tr>
									<td>名称</td>
									<td>${one.name}</td>
								</tr>
								<tr>
									<td>类型</td>
									<td>${one.appTypeStr }</td>
								</tr>
								<tr>
									<td>状态</td>
									<td>${one.statusStr }</td>
								</tr>
								<tr>
									<td>部门审核人</td>
									<td>${one.depUsers.nickName}</td>
								</tr>
								<tr>
									<td>部门审核人意见</td>
									<td>${one.depAdmNote}</td>
								</tr>
								<tr>
									<td>局长审核人</td>
									<td>${one.dirUsers.nickName}</td>
								</tr>
								<tr>
									<td>局长审核人意见</td>
									<td>${one.dirAdmNote}</td>
								</tr>
								<tr>
									<td>创建时间</td>
									<td>${one.createTime }</td>
								</tr>
								<tr>
									<td>更新时间</td>
									<td>${one.updateTime}</td>
								</tr>
								<tr>
									<td>内容</td>
									<td>${one.content }</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			
			<div class="col-md-8 col-sm-10">
				<form id="form" method="post" class="form-horizontal" action="${rootPath }/head/lawEnf/caseUpdateSubmit.htm">
					<input type="hidden" name="operType" value="${param.operType }">
					<input type="hidden" name="id" value="${one.id }">
					
					<div class="form-group">
						<label for="inputPassword" class="col-sm-3 control-label">意见</label>
						<div class="col-sm-8">
							<textarea rows="5" cols="80" name="note">${one.note }</textarea>
						</div>
					</div>
					
					<div class="form-group">
						<label for="status" class="col-sm-2 control-label">状态:</label>
					</div>
					<div class="form-group">
						<div class="col-sm-8 form-check form-check-inline">
							&nbsp;&nbsp;&nbsp;&nbsp; <label for="status0"
								class="form-check-label"> <input type="radio"
								id="status0" name="status" class="form-check-input" value="1"
								checked="checked"> 通过
							</label> &nbsp;&nbsp; <label for="status1" class="form-check-label">
								<input type="radio" id="status1" name="status"
								class="form-check-input" value="0"
								> 不通过
							</label>
						</div>
					</div>
					
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-2">
							<button class="btn btn-md btn-primary" type="submit">提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>